import lazyLoadView from '@/router/lazy-load';
import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const DeviceManagement: AppRouteRecordRaw = {
  path: '/device',
  name: 'Device',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: 'menu.device',
    requiresAuth: false,
    icon: 'icon-storage',
    order: 105,
    // roleCode: 'GROUP_ELDER_ADMIN',
  },
  children: [
    {
      path: 'inventory',
      name: 'DeviceInventory',
      component: lazyLoadView(
        () => import('@/views/lhj-v1/device-management/m-inventory/index.vue')
      ),
      meta: {
        locale: 'menu.device.inventory',
        requiresAuth: false,
        // roleCode: 'GROUP_ELDERLY',
        pageName: '库存列表',
      },
    },
    {
      path: 'install',
      name: 'DeviceInstall',
      component: lazyLoadView(
        () => import('@/views/lhj-v1/device-management/m-install/index.vue')
      ),
      meta: {
        locale: 'menu.device.install',
        requiresAuth: false,
        // roleCode: 'GROUP_ELDERLY',
        pageName: '绑定列表',
      },
    },
    {
      path: 'running',
      name: 'DeviceRunning',
      component: lazyLoadView(
        () => import('@/views/lhj-v1/device-management/m-running/index.vue')
      ),
      meta: {
        locale: 'menu.device.running',
        requiresAuth: false,
        // roleCode: 'GROUP_ELDERLY',
        pageName: '运行列表',
      },
    },
  ],
};

export default DeviceManagement;
